package by.dvrudenko.avtobaza.webapp.page.home;

import javax.inject.Inject;

import by.dvrudenko.avtobaza.services.DriverService;
import by.dvrudenko.avtobaza.webapp.page.BaseLayout;
import by.dvrudenko.avtobaza.webapp.page.car.panel.CarDetailsPanel;
import by.dvrudenko.avtobaza.webapp.page.driver.panel.DriverDetailsPanel;
import by.dvrudenko.avtobaza.webapp.page.order.panel.OrderDetailsPanel;


public class HomePage extends BaseLayout {
	
	@Inject
	private DriverService driverService;
	
	@Override
	protected void onInitialize() {
		super.onInitialize();
		
		add(new CarDetailsPanel("carDetailsPanel"));
		add(new DriverDetailsPanel("driverDetailsPanel", driverService.getRandomDriver()));		
		add(new OrderDetailsPanel("orderDetailsPanel"));
	}

}
